<?php
namespace app\common\model;

use think\model\concern\SoftDelete;
use think\Model;

class Ip extends Model
{
     //定义主键
    protected $pk = 'id';

    //定义模型对应的表名
    protected $table = 'ips';
    
    public function getCreateTimeLabelAttr($value, $data)
    {
        if (!isset($data['create_time']) || empty($data['create_time'])) {
            return '';
        }
        
        return date('Y-m-d H:i:s', $data['create_time']);
    }
}